In order to create concurrency, the client process will start one
sub-process for each connection and wait a pre-configured amount of time
before starting a new sub-process [without waiting for the sub-process to
quit/finish]. A client sub-process will quit once closing the socket i.e.
after sending/receiving the pre-defined number of messages to the server on
the same connection.
The various behavior of a server process is defined via environment variables. Below is a list of the set of configuration environment variables, which are currently used, together with their default values [i.e. in case the are present]
| Variable Name | Default value | What is used for | Used on which Platform(s) |
|---|---|---|---|
| DsTest_portsBase | 12345 | The base port number to be used by server processes | All |
| DsTest_numberOfPorts | 1 | Together with the DsTest_portsBase will define port(s) number(s) where server processes will listen to and service clients requests. For ex. if DsTest_portsBase is set to 12345 and DsTest_numberOfPorts is set to 3, server processes will listen to ports 12345, 12346 & 12347 | All |
| DsTest_distributeServerPortsOnAllProcessors | 1 | If this variable is set to 0, then each server process will listen/service all ports defined by DsTest_portsBase and DsTest_numberOfPorts variables otherwise ports get distributed evenly among the server processes running on the system | TelORB only |
| DsTest_disableServerProcess | 0 | Useful if one needs to define what type of processes (i.e. Client/Server) will run in a TelORB cluster. For instance, if one would like to configure a TelORB cluster with client processes only this variable need to be set to 1 | TelORB only |
| DsTest_verboseLevel | 1 | This is used to control the level of verbosity (i.e. console printout) one would like to have. 0 is for silent. 1 is to show informational printouts. 2 to show informational printouts as well tracing system calls. Lastly, printout about errors will shows up only if the verbose level is greater then zero. | All |
| DsTest_useOneSessionServerPerPort | 0 | If set to 1, only one server session process will service all requests on a given port, otherwise one process instance started for each connection made to a server's port | All |
| DsTest_serverReplyPrependMsg | '' | When replying to a client message, prefix the original message with this string. Ex.: if DsTest_serverReplyPrependMsg is set to "You've said: " and a client sent a "Hello server" message string to the server, the server will send back to the client the following "You've said: Hello server" | All |
| DsTest_serverReplyPostendMsg | '' | When replying to a client message, postfix the original message with this string. Ex.: if DsTest_serverReplyPostendMsg is set to " to you too" and and a client sent a "Hello" message string to the server, the server will send back to the client the following "Hello to you too" | All |
| DsTest_delayBetweenServerRestartsOnPort | 500 | Defines how long to wait (in milliseconds) before starting a new server instance on a port after the previous process has quit | All |
In addition to the regular IDPs which needs to be included in a TelORB
running system, one have to make sure that the following IDPs are present
in the SOFTWARE section of the system.epct configuration file
IDP/D32 // NetInet_IDP IDP/DSS01 // DsSocket test application, i.e. this test app.
On the processors which one would like to have the server processes running on, one needs to add DsTestServerPool to the other processes pool
The behavior of server processes is configured via environment variables which needs to be present in the ENVIRONMENT DATA section of the system.epct configuration file. Please have a look at the General section for the set of available configuration variables and their meaning
setenv DsTest_numberOfPorts 4440
DsTest_numberOfPorts=4440; export DsTest_numberOfPorts
For the list of environment variables available and their meaning, please have a look at the General section above
If one needs to start multiple server processes on a Unix system, it's
important to make sure that each process will listen on a separate set of
ports. This is done by changing the values of DsTest_portsBase and
DsTest_numberOfPorts.
For instance if one would like to service 5 ports on a Unix machine, let say
from 44441 to 44445 using 2 processes, in such a way that one process
service 3 ports and another 2 ports; you would set DsTest_portsBase
to 44441 and DsTest_numberOfPorts to 3 before starting one process
and than set the previous environment variables to 44444 and 2 respectively
before starting the second process
The various behavior of a client process is defined via environment variables. Below is a list of the set of configuration environment variables, which are currently used, together with their default values [i.e. in case the are present]
| Variable Name | Default value | What is used for | Used on which Platform(s) |
|---|---|---|---|
| DsTest_host | 127.0.0.1 | This should be set to the host IP address of the server(s) processes | All |
| DsTest_portsBase | 12345 | The base port number used by the server process(es) | All |
| DsTest_numberOfPorts | 1 | Together with the DsTest_portsBase will define port(s) number(s) to be used to connect to a server process For ex. if DsTest_portsBase is set to 12345 and DsTest_numberOfPorts is set to 3, a client can use ports 12345, 12346 & 12347 to connect to a server running on DsTest_host | All |
| DsTest_message | 'This is a DsTest message' | This defines the content of the message to be send to a server | All |
| DsTest_verboseLevel | 1 | This is used to control the level of verbosity (i.e. console printout) one would like to have. 0 is for silent. 1 is to show informational printouts. 2 to show informational printouts as well tracing system calls. Lastly, printout about errors will shows up only if the verbose level is greater then zero. | All |
| DsTest_numOfMessages | 1 | This will define how many time a client will send the same DsTest_message on a connection before closing it | All |
| DsTest_randomizePortsConnection | 0 | If set to 0, connection made to sub-sequent ports will be sequential otherwise ports number will be picked up randomly | All |
| DsTest_delayBetweenPortsConnection | 2000 | This defines the amount of time (in milliseconds) before starting a new sub-client process | All |
| DsTest_disableClientProcess | 0 | Useful if one needs to define what type of processes (i.e. Client/Server) will run in a TelORB cluster. For instance, if one would like to configure a TelORB cluster with client processes only this variable need to be set to 1 | TelORB only |
IDP/D32 // NetInet_IDP
IDP/DSS01 // DsSocket test application, i.e. this test app.
The behavior of client processes is configured via environment variables which needs to be present in the ENVIRONMENT DATA section of the system.epct configuration file. Please have a look at the previous section for the set of available configuration variables and their meaning
setenv DsTest_host '134.138.94.30'
DsTest_host='134.138.94.30'; export DsTest_host
For the list of environment variables available and their meaning, please have a look at the General section above
One can start multiple Client processes on the same Unix machine with or without the same set of configuration parameters but starting multiple client processes from different Unix machine would stress more a server.